<html>
<head><meta charset="utf-8"><title>Accessing uninitialized field lvalues · t-lang/wg-unsafe-code-guidelines · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/index.html">t-lang/wg-unsafe-code-guidelines</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Accessing.20uninitialized.20field.20lvalues.html">Accessing uninitialized field lvalues</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="133104916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Accessing%20uninitialized%20field%20lvalues/near/133104916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nicole Mazzuca <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Accessing.20uninitialized.20field.20lvalues.html#133104916">(Aug 31 2018 at 05:43)</a>:</h4>
<p><a href="https://github.com/ubsan/newt/blob/master/src/parser/ident.rs#L27" target="_blank" title="https://github.com/ubsan/newt/blob/master/src/parser/ident.rs#L27">https://github.com/ubsan/newt/blob/master/src/parser/ident.rs#L27</a></p>
<p>I feel like this is a usecase we should keep in mind, at least - given a value of type <code>pointer to T</code>, you need to be able to access fields on the object, even if the object is uninitialized.</p>



<a name="133106507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Accessing%20uninitialized%20field%20lvalues/near/133106507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Accessing.20uninitialized.20field.20lvalues.html#133106507">(Aug 31 2018 at 06:32)</a>:</h4>
<p><span class="user-mention" data-user-id="125253">@Nicole Mazzuca</span> definitely. please bring this up for discussion once we are talking about validity invariants :)</p>



<a name="133106521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Accessing%20uninitialized%20field%20lvalues/near/133106521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nicole Mazzuca <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Accessing.20uninitialized.20field.20lvalues.html#133106521">(Aug 31 2018 at 06:33)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> yeah, just wanna make sure it's in the chat somewhere so I remember</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>